<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>Insert title here</title>
		<script type="text/javascript">
			function changeImgCode(){
				/* 注意这个src必须要改变  */
				document.getElementById("imgCode").src="VerifyCodeServlet?"+Math.random();
			}
		</script>
	</head>
	<body>
		<h1>用户注册页面</h1>
	<form action="RegisterServlet" method="post">
		用户名:<input type="text" name="username"><br>
		密码：<input type="password" name="userpass"><br>
		验证码：<input type="text" name="code">
		<img src="VerifyCodeServlet" width="100" height="20" id="imgCode" onclick="changeImgCode()">
		<a href="javascript:void(0)" onclick="changeImgCode()">看不清，换一张</a>
		<br>
		<input type="submit" value="注册">
		<input type="reset" value="重置">
	</form>
	
	</body>
</html>